<?php

$this->jQuery()->enable();
$this->headLink()->prependStylesheet('/js/jquery/css/themes/base/jquery.ui.all.css');
//CKEDITOR.config.protectedSource.push( /<style.+>[\S\s]*<\/style>/gi );
//{
//			showOn: 'button',
//			buttonImage: '/imagens/calendario.png',
//			buttonImageOnly: true}
$this->headScript()->appendFile('/js/ckeditor/ckeditor.js')
					->appendFile('/js/ckeditor/adapters/jquery.js')
					->appendFile('/js/jquery/ui/jquery.ui.core.js')
					->appendFile('/js/jquery/ui/jquery.ui.widget.js')
					->appendFile('/js/jquery/ui/jquery.ui.datepicker.js')
					->appendFile('/js/jquery/ui/i18n/jquery.ui.datepicker-pt-BR.js')
					->appendFile('/js/geralAjax.js')
					->appendFile('/js/jquery/ui/jquery.ui.button.js');					
$this->headScript()->appendScript("
$(document).ready(function(){
		CKEDITOR.config.startupMode = 'source';		
 		CKEDITOR.config.resize_enabled = false;
		var config = {toolbar:[
			['Source','Preview'],
			[ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton','HiddenField'],
			['NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl'],
			['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe']
		]}        
        $('textarea#html').ckeditor(config);
        $('#dataenvio').datepicker();
		
		$('input#Salvar').button();		
 	});
 	
 	
");
?>
<div id="flash-messeger"><?php echo $this->flashMessenger(); ?></div>
<div id="mapa">Campanhas/<span>Editar Campanha</span></div>
<form action="<?php echo $this->form->getAction();?>" method="<?php echo $this->form->getMethod(); ?>" enctype="<?php echo $this->form->getEnctype(); ?>">
 <fieldset>
  		 <legend>Dados de Campanha</legend>
   		 <table width="100%" border="0" cellspacing="2" cellpadding="0">
  		 	<tr>    
   			 	<td><?php echo $this->form->nome; ?></td>
  			</tr>
  			<tr>
   				<td><?php echo $this->form->assunto; ?> </td>
 			</tr>
 			<tr>
				 <td><?php echo $this->form->remetente; ?></td>
		    </tr>
  			<tr>
	    	    		    
	    	    <td><?php echo $this->form->html; ?></td>
		    </tr>
		 </table>  
 </fieldset>
  <fieldset>
  		 <legend>Período de Envio</legend>
   		 <table width="100%" border="0" cellspacing="2" cellpadding="0">
  		 	<tr>    
   			 	<td><?php echo $this->form->dataenvio; ?></td>
  			</tr>
  			<tr>
   				<td><?php echo $this->form->horaenvio; ?>
   				<?php echo $this->form->minutoenvio; ?></td>
 			</tr>
  			<tr>	    	    		    
	    	    <td></td>
		    </tr>
		 </table>  
 </fieldset>
   <fieldset>
  		 <legend>Dados da base</legend>
   		 <table width="100%" border="0" cellspacing="2" cellpadding="0">
  		 	<tr>    
   			 	<td><?php echo $this->form->lista; ?><div id="conteudoAjax"></div></td>
  			</tr>
  			<tr>
   				<td><?php echo $this->form->filtro; ?><div id="conteudoAjaxFiltro"></div></td>
 			</tr>
  			
		 </table>  
 </fieldset>
 <?php echo $this->form->id; ?>
 <?php echo $this->form->Salvar; ?>
</form>
<script language="javascript" >
document.getElementById('filtro').disabled=false;
contaListaEdit(<?php echo $this->idlista;?>,'/admin/listas/conta-email-lista/');
contaEmailFiltro(document.getElementById('lista').value,<?php echo $this->idfiltro;?>,'/admin/emails/conta-email/');
</script>